'Requestnotify TEXT "Could not find the configuration file.\nRun CfgGetNET to create one." BT "_OK"'
EXIT
END
ELSE DO
CALL OPEN(prf,cfgpath||cfgfile,'R')
DO UNTIL EOF(prf)
line = READLN(prf)
SELECT
WHEN UPPER(WORD(line,1)) = 'BBS' THEN DO
bbs = SUBWORD(line,2)
END
WHEN UPPER(WORD(line,1)) = 'ASKFR' THEN DO
askfr = WORD(line,2)
END
WHEN Upper(Word(line,1)) = 'REQDIR' THEN DO
reqdir = SubWord(line,2)
END
WHEN Upper(Word(line,1)) = 'FTPSAVEMODE' THEN DO
ftpsavemode = UPPER(WORD(line,2))
END
WHEN Upper(Word(line,1)) = 'FTPSITENAME' THEN DO
ftpsitename = UPPER(WORD(line,2))
END
WHEN UPPER(WORD(line,1)) = 'AMOSAIC' THEN DO
hotlist_amosaic = WORD(line,2)
amosaic = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'AWEB' THEN DO
hotlist_aweb = WORD(line,2)
aweb = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'IBROWSE' THEN DO
hotlist_ibrowse = WORD(line,2)
ibrowse = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'VOYAGER' THEN DO
hotlist_voyager = WORD(line,2)
voyager = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'HTML' THEN DO
hotlist_html = WORD(line,2)
html = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'NCFTP' THEN DO
hotlist_ncftp = WORD(line,2)
ncftp = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'DOPUS' THEN DO
hotlist_dopus = WORD(line,2)
dopus = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'GUIFTP' THEN DO
hotlist_guiftp = WORD(line,2)
guiftp = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'AMFTP' THEN DO
path_amftp = WORD(line,2)
amftp = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'TCPDL' THEN DO
hotlist_tcpdl = WORD(line,2)
tcpdl = WORD(line,3)
END
WHEN UPPER(WORD(line,1)) = 'TCPDL_PRE' THEN DO
pre_tcpdl = SUBWORD(line,2)
END
WHEN UPPER(WORD(line,1)) = 'TCPDL_SUF' THEN DO
suf_tcpdl = SUBWORD(line,2)
END
WHEN UPPER(WORD(line,1)) = 'TCP-IP' THEN DO
tcp_ip = SUBWORD(line,2)
END
OTHERWISE NOP
END
END
CALL CLOSE(prf)
CALL checkprefs
END
RETURN
/*~!*/
/*!~ "CheckPrefs" */
checkprefs:
IF ~DATATYPE(askfr, 'BIN') THEN CALL prefserror('ASKFR')
IF ~DATATYPE(ftpsavemode, 'ALP') THEN CALL prefserror('FTPSAVEMODE')
IF ~DATATYPE(ftpsitename, 'BIN') THEN CALL prefserror('FTPSITENAME')
IF ~DATATYPE(amosaic, 'BIN') THEN CALL prefserror('AMOSAIC')
IF ~DATATYPE(aweb, 'BIN') THEN CALL prefserror('AWEB')
IF ~DATATYPE(ibrowse, 'BIN') THEN CALL prefserror('IBROWSE')
IF ~DATATYPE(voyager, 'BIN') THEN CALL prefserror('VOYAGER')
IF ~DATATYPE(html, 'BIN') THEN CALL prefserror('HTML')
IF ~DATATYPE(ncftp, 'BIN') THEN CALL prefserror('NCFTP')
IF ~DATATYPE(dopus, 'BIN') THEN CALL prefserror('DOPUS')
IF ~DATATYPE(guiftp, 'BIN') THEN CALL prefserror('GUIFTP')
IF ~DATATYPE(amftp, 'BIN') THEN CALL prefserror('AMFTP')
IF ~DATATYPE(tcpdl, 'BIN') THEN CALL prefserror('TCPDL')
RETURN
/*~!*/
/*!~ "PrefsError" */
prefserror:
prferr = ARG(1)
ADDRESS(thorport)
'REQUESTNOTIFY TEXT "The config file is not in the\ncorrect format. An error occured at\nor before 'prferr'.\nPlease run CfgGetNET to correct this.\n\nIf the problem remains, contact\nthe author at rvhooff@caiw.nl" BT "_OK"'
CALL cleanup
RETURN
/*~!*/
/*!~ "Filter" */
filter:
PARSE ARG adres,fltr
lngth = LENGTH(adres)
IF fltr = 2 THEN adres=REVERSE(adres)
DO i = 1 TO filter.fltr.count
check = POS(filter.fltr.i, adres)
IF check ~=0 THEN adres = DELSTR(adres, check)
END
punt = LASTPOS('.', adres)
IF punt ~=0 THEN lngth = length(adres)
IF (punt = lngth) THEN adres = DELSTR(adres, punt)
IF fltr = 2 THEN adres=REVERSE(adres)
RETURN(adres)
/*~!*/
/*!~ "ListFound" */
listfound:
IF found.COUNT > 0 THEN DO
IF scanaminet = 1 THEN foundtitel = 'Select files to download.'
ELSE foundtitel = 'Select address(es) to save.'
'REQUESTLIST INSTEM' found 'OUTSTEM' save 'TITLE "'foundtitel' Total: 'num'" MULTISELECT SIZEGADGET'
IF (RC = 30) THEN DO
'REQUESTNOTIFY TEXT "'THOR.LASTERROR'" BT "_Ok"'
CALL cleanup
END
IF RC ~= 5 THEN ok = 1
END
IF found.COUNT = 0 THEN DO
IF scanhttp = 1 THEN titel = 'HTTP addresses'
IF scanemail = 1 THEN titel = 'Email addresses'
IF scanftp = 1 THEN titel = 'FTP addresses'
IF scanaminet = 1 THEN titel = 'Aminet files'
'REQUESTNOTIFY TEXT "No' titel 'found in this message." BT "_Ok"'
END
RETURN
/*~!*/
/*!~ "ListSave" */
listsave:
PARSE ARG soort
DO svc = 1 TO save.count
IF name.svc = 'NAME.'svc THEN name.svc = subj '('svc')'
showname.svc = LEFT(name.svc,20,' ')
show.svc = showname.svc' - 'save.svc
END
sep = save.count +1
but = save.count +2
show.sep = ''
show.but = 'SAVE'
show.count = save.count+2
IF soort = 1 THEN titel = 'Select to enter a name'
IF soort = 2 THEN titel = 'Select address to edit userdata'
'REQUESTLIST INSTEM' show 'TITLE "'titel'" SIZEGADGET'
IF (RC = 30) THEN DO
'REQUESTNOTIFY TEXT "'THOR.LASTERROR'" BT "_Ok"'
CALL cleanup
END
IF RC ~= 5 THEN DO
selected = RESULT
IF selected = 'SAVE' THEN DO
IF soort = 1 THEN DO
CALL savehotlist
RETURN
END
IF soort = 2 THEN DO
CALL save_userdata
RETURN
END
END
DO n = 1 TO save.count
IF selected = show.n THEN DO
IF soort = 1 THEN DO
'REQUESTNOTIFY TEXT "What do you want to change?" BT "_Name|_URL"'
IF RESULT = 1 THEN DO
'REQUESTSTRING title "Enter a name" BT "_OK|_Cancel" BODY "'save.n'" ID "'name.n'"'
IF RC = 0 THEN name.n = RESULT
IF RC = 5 THEN name.n = name.n
END
IF RESULT = 0 THEN DO
'REQUESTSTRING title "Edit the URL" BT "_OK|_Cancel" BODY "'save.n'" ID "'save.n'"'